package com.iwop.moto.service.impl;

import com.iwop.moto.model.SuperRecordModel;
import com.iwop.moto.service.BaseService;
import com.iwop.moto.service.OrderAssessService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author liuwb 2016-07-29 14:01
 */
@Service
public class OrderAssessServiceImpl extends BaseService implements OrderAssessService {


    /**
     * 商品评价 - 新增
     */
    public void insertAssess(SuperRecordModel SRModel){
        getSqlSession().insert("MOrderAssessMapper.insertAssess",SRModel);
    }

    /**
     * 商品评价 - 列表
     */
    public List<SuperRecordModel> findOrderAssessByGoodsId(SuperRecordModel SRModel){
        return getSqlSession().selectList("MOrderAssessMapper.findOrderAssessByGoodsId",SRModel);
    }

    /**
     * 商品评价 - 用户订单评价
     */
    public SuperRecordModel findOrderAssessDetail(SuperRecordModel SRModel){
        return getSqlSession().selectOne("MOrderAssessMapper.findOrderAssessDetail",SRModel);
    }


}
